package edu.siu.math.egut.drivers;



import edu.siu.math.egut.util.*;

/**
 * Used to test commutators.
 * 
 * @author joe pleso
 *
 */
public class CommutatorTester {

    /**
     * Purpose of this program is to test the commutator algorithm's
     * use of the commutator Cayley table.
     * 
     * (To test the algorithm used to construct the 
     * table, use InternalCommutatorChecker.)
     * 
     * 
     * 
     * 
     * @param args ignored
     */

    
    public static void main(String[] args) {
	
	ExceptionalGroup g = ExceptionalGroup.getGroup(2);
	int[][] r = g.getRoots();
	for( int i = 0 ; i < 12 ; i ++)
	    for( int j = 0 ; j < 12 ; j++)
	    {
		int[] a = r[i];
		int[] b = r[j];

		ExceptionalGroupElement s = g.chi( a, 
			LaurentPolynomial.create("r"));
		ExceptionalGroupElement t = g.chi( b, 
			LaurentPolynomial.create("s"));
		ExceptionalGroupElement product = 
		    ExceptionalGroupElement.times(s,t);
		
		System.out.println(product);
		product.pushRight(0);
		System.out.println(product);
		System.out.println();
		System.out.println();
		
		
	    }


	
	
    }

}
